<?php
class CCategory
{
	public function __construct($p_strCountry)
	{
		$this->_filename	= ROOT_SITE.'/data/category';
		@mkdir($this->_filename);
		$this->_filename	= $this->_filename.'/'.$p_strCountry.'.category.dat';
	}
	
	public function save($p_arrData)
	{
		$strContent	= json_encode($p_arrData);
		@file_put_contents($this->_filename, $strContent);
	}
	
	public function get()
	{
		$strContent	= @file_get_contents($this->_filename);
		return $strContent ? json_decode($strContent, true) : null;
	}
}
?>